﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Brjostagjof.Models.AdminViewModel>" %>
    

<div>
    <table>
        <caption><%: Model.popularArticles.Count() %> Vinsælustu greinar</caption>
        <thead>
            <tr>
                <th>Grein</th>
                <th>Lesin</th>
                <th>Skrifuð af</th>
            </tr>
        </thead>
        <tbody>
            <% foreach (var article in Model.popularArticles)
                { %>
                    <tr>
                        <td><%: Html.ActionLink(article.Title, "SynaGrein", new { id = article.ID } )%></td>
                        <td><%: article.Count %></td>
                        <td><%: article.FullName %></td>
                    </tr>
            <%} %>
        </tbody>
    </table>
</div>